ff6d94099150ac49cc52ec14823a89b4ac556a72,util-taglib/src/com/liferay/taglib/util/IncludeTag.java,IncludeTag,getServletContext,#,124

Before Change



		ServletContext servletContext = super.getServletContext();

		if (Validator.isNotNull(_portletId)) {
			try {
				servletContext = getServletContext(
					servletContext, getServletRequest());

After Change


		ServletContext servletContext = super.getServletContext();

		try {
			if (Validator.isNull(_portletId)) {
				return servletContext;
			}

			HttpServletRequest request = getServletRequest();

			ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute(
				WebKeys.THEME_DISPLAY);

			Portlet portlet = PortletLocalServiceUtil.getPortletById(
				themeDisplay.getCompanyId(), _portletId);

			if (portlet == null) {
				return servletContext;
			}

			PortletApp portletApp = portlet.getPortletApp();

			if (!portletApp.isWARFile()) {
				return servletContext;
			}

			return PortalUtil.getServletContext(portlet, servletContext);